﻿using NuMvvm.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NuMvvm.Testing.Services
{
    public class MockDialogService : IDialogService
    {
        public async Task ShowAsync(string text, string title)
        {
            DialogShown("Text");
        }

        public async Task ShowErrorAsync(string text, string title)
        {
            DialogShown("Error");
        }

        public async Task ShowInfoAsync(string text, string title)
        {
            DialogShown("Info");
        }

        public async Task ShowWarningAsync(string text, string title)
        {
            DialogShown("Warning");
        }

        public async Task<bool?> ShowYesNoAsync(string text, string title)
        {
            DialogShown("YesNo");
            return Result;

        }

        public async Task<bool?> ShowYesNoCancelAsync(string text, string title)
        {
            DialogShown("YesNoCancel");
            return Result;
        }

        public Action<string> DialogShown = (text) => { };

        public bool? Result;
    }
}
